import Vue from 'vue';
import Router from 'vue-router';
import home from '../components/home/home.vue';
import Detail from '../components/detail/detail.vue';
import list from '../components/detail/list.vue';
import nowplaying from '../components/detail/nowplaying.vue';
import willplaying from '../components/detail/willplaying.vue';
//import cinema from '../components/cinemas/cinema.vue';
//import login from '../components/usercenter/login.vue';

Vue.use(Router);

export default new Router({
    routes: [{
        path: '/',
        name: 'home',
        component: home
    }, {
        path: '/film/:id',
        name: 'detail',
        component: Detail
    },{
			path:'/list',
			redirect:'/list/now-playing',
			name:'list',
			component:list,
			children:[
				{
					path:'now-playing',
					name:'nowplaying',
					component:nowplaying
				},
				{
					path:'will-playing',
					name:'willplaying',
					component:willplaying
				}
			]
		}, 
    	
   
    {
        path: '*',
        redirect: '/home'
    }]
})